import axi from '../../../plugin/axios/axios'

//基地概况
export const getBaseSummary = params => {
  return axi({
    url: `/api/v1/statistics/bases/summary`,
    method: 'GET',
    params
  }, true)
}

//学校概况
export const getSchoolSummary = params => {
  return axi({
    url: '/api/v1/statistics/school',
    method: 'GET',
    params
  }, true);
}

//全部基地
export const getBasesByAreaCodes = codes => {
  return axi({
    url: '/api/v1/dirty/base/areas',
    method: 'GET',
    params: {
      codes:codes
    }
  }, true)
}

export const getSchoolByAreaCodes = codes => {
  return axi({
    url: '/api/v1/school/areas',
    method: 'GET',
    params: {
      addressCodes: codes
    }
  });
}

//实践次数
export const getPracticeByDate = params => {
  return axi({
    url:'/api/v1/statistics/practice',
    method:'GET',
    params
  })
}

//获取指定天的签到记录
export const getSignRecordsByDay = params => {
  return axi({
    url: '/api/v1/dirty/reservation/details/day',
    method:'GET',
    params
  })
}

//获取到预约的按天统计
export const getReservationStatistics = params => {
  return axi({
    url: '/api/v1/statistics/reservation/day',
    method: 'GET',
    params
  });
}

//获取指定天的所有预约
export const getReservationDetails = params => {
  return axi({
    url: '/api/v1/statistics/reservation/details/day',
    method: 'GET',
    params
  });
}

//根据预约编号获取团队成员.
export const getTeamsByReservationId = id => {
  return axi({
    url: `/api/v1/dirty/reservation/teams/${id}`,
    method: 'GET'
  });
}
